import java.io.IOException;

public class Main{

	/**
	 * @param args
	 * @throws IOException
	 * @throws NumberFormatException
	 */
	public static void main(String[] args) throws NumberFormatException,
			IOException {

		java.io.BufferedReader r = new java.io.BufferedReader(
				new java.io.InputStreamReader(System.in));

		float[] array = new float[300];
		array[0] = 0;
		float sum = 0;
		for (int i = 1; i < 300; i++) {
			sum += 1.0 / (i + 1);
			array[i] = sum;
		}
		float number = -1;
		while (true) {
			number = Float.parseFloat(r.readLine());
			if (number == 0.00) {
				break;
			}
			int index = 1;
			while (number > array[index])
				index++;
			System.out.println(index + " card(s)");
		}

	}
}
